package com.sbp.messsage_consumer_demo.service.bs;

import com.dap.api.AbstractSunriseService;
import com.dap.param.StringInput;
import org.mengyun.tcctransaction.api.TransactionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TestQueueConsumerServiceImpl extends AbstractSunriseService {
    static final Logger logger = LoggerFactory.getLogger(TestQueueConsumerServiceImpl.class);

    @Transactional
    public Object execute(TransactionContext transactionContext, StringInput stringInput) {
        logger.debug("TestQueueConsumerServiceImpl, start ---------------");
        /*try {
            Thread.sleep(10 * 1000);
        } catch (Exception e) {
            logger.info("", e);
        }*/

        logger.debug("TestQueueConsumerServiceImpl, end, stringInput.getBody() = {}", stringInput.getBody());
        return null;
    }
}
